package com.why.controller;


import com.why.entity.User;
import com.why.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 飓风微尘
 * @since 2022-05-20
 */
@RestController
@RequestMapping("/user")
public class UserController {

    @Autowired
    IUserService userService;

    @RequestMapping("/list")
    public List<User> list(){
        List<User> list = userService.list();
        return list;
    }
}
